Skip to content

test(browser): anchor the conversation quiet-time clock - #8343

Merged
1 commit merged into
mainfrom
codex/dashboard-clock-20261108T053510
Nov 8, 2026
Merged

1 commit merged into
mainfrom
codex/dashboard-clock-20261108T053510

Conversation

@cocolord

@cocolord cocolord commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

The conversation activity smoke read the browser's current time and then called clock.pauseAt in a later command. Under CI load that instant was already past, causing Cannot fast-forward to the past before the navigation and recovery assertions ran. Install the clock from one observed anchor and pause at anchor + 25 seconds, using the existing anchored-clock pattern. The quiet-time, elapsed-time, navigation, steering/refusal and recovery assertions remain intact.

Validation at 3b2759836b514336787a150a6236f88e8704536a over main 5f78e8723db6819bbe78c0acbdf0a5f1ef9b0571:

  • An independent Playwright counterprobe advances the clock by 500 ms between observation and pause: the old target is refused; the anchored future target succeeds and stays frozen. An earlier 50 ms wall-delay probe did not reproduce the race and is retained as negative evidence.
  • The complete conversation-activity scenario passes against the built Chat bundle and its owning source backend using the synthetic browser fixture (LOOPX_PERSONAL_WORKSPACE_PACKAGED=1), with an isolated port and headless browser. Syntax and the publication-file boundary scan pass.

Only the smoke changes. No frontend rendering, runtime API, authority or timeout changes are included. Inherited TypeScript CI failures are being repaired through the separate kernel loading proposal. Raw captures and logs remain private.

Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
@mergify

mergify Bot commented Nov 8, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @cocolord.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 8, 2026

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max

动机 / Motivation

维护对话浏览器验收的人,在检查安静中的对话和导航前后的计时一致性时会遇到这个问题。 旧 smoke 对运行中的时间采样后再暂停,命令到达时目标可能已经过去;此 head 改用安装起点后 25 秒的目标,意图避免该错误。 500ms 对照通过,但 25.25 秒受控延迟仍在原交互断言之前报错,修复的确定性边界尚未成立。 范围仅为既有 smoke 的时钟设置,不修改对话产品、SSE、权限或线上计时策略。

改动思路 / Approach

固定安装的初始值没有停止安装后运行的时钟。新序列把暂停目标放在安装值之后 25 秒,去掉原来的独立快进和再次采样,能修复短命令延迟;如果安装到暂停命令的延迟超过这段余量,同一个过去时间错误仍存在。应保留现有一个场景,通过真正固定比较使用的 Date、保持定时器推进并恢复系统时间来解决原问题,无需增加生产重试或新时钟框架。

主干 e441ae1f2d56d21568e624ae70c71d8226c191d7 已有同样的安装锚点与未来 25 秒暂停方案,仅变量名不同。它也不是任意延迟安全的控制组。本 PR 的短延迟改善因此不能再作为相对当前主干的新收益;应合并为同一处有意义的后续修复,或者关闭已被覆盖的提案。

具体改动 / Changes

关键内容讲解

准确 head 3b2759836b514336787a150a6236f88e8704536a,相对真实 merge base 5f78e8723db6819bbe78c0acbdf0a5f1ef9b0571 只有 examples/personal-workspace-browser/conversation-activity.mjs 的 +5/-5。第 49 行从页面采样安装起点,第 50 行以该时间安装 clock,第 53 行暂停到起点后 25 秒;quiet、elapsed、导航一致性、steering/refusal、恢复断言均保留。ClockController.pauseAt 仍先停止真实推进,再计算目标与当前值之差;负差值在快进实现中拒绝。

规范依据为 docs/development/good-smokes.md,固定修订 5f78e8723db6819bbe78c0acbdf0a5f1ef9b0571。未编号审阅表行 Is the result deterministic? 为 not_met:调度延迟仍决定能否进入原语义断言。Is the assertion durable? 为 implemented:原状态、导航与恢复断言没有删改。

在 Ego 的真实空白页注入当前依赖 Playwright 1.62.1 的原始 clock 实现,按准确序列执行:

序列 安装到暂停前延迟 观察
基线:快进后采样再暂停 500ms FAIL,目标已过去约 501ms
当前:安装锚点后 25 秒暂停 500ms PASS,冻结到指定值
当前同一序列 25,250ms FAIL,暂停前已到锚点后 25,251ms

失败为 Cannot fast-forward to the past,探针执行完成并恢复了原生计时器,没有把观察超时当作反例。该检查覆盖实际 clock 组件及本次控制序列,未运行完整 Playwright driver、打包 Chat 页面、HTTP/SSE 或导航旅程。作者给出的完整场景通过及 50ms 未复现只作为其声明保留,不替代本轮反例。node --check、标准 premerge 四项直接检查、两项 catalog canary 和公共边界检查 PASS;未查询远端 CI。

对主干的风险 / Risks

[P2] 25 秒未来目标仍会被运行中的时钟追过(第 53 行)。 在安装完成到暂停调用之间发生 25.25 秒延迟时,原错误仍使场景在 quiet 与导航断言前退出。请真正固定比较使用的 Date,保留定时器推进与比较后的恢复,并重跑短延迟、25.25 秒反例及完整场景;扩大常量或改注释不能完成原确定性要求。这个缺陷在本 PR 的目标修复中仍未消除,并非声称它新引入生产回归。

当前主干的同义修复与本分支还需整合;冲突或重复本身没有被当作时钟失败证据。同作者 #8346、#8351、#8339 的声明解耦/资格记录主题不同,本轮未建立同形批量违规或反复违规证据,不建议贡献限制。保留一个现有场景即可。

我的整体评价 / Verdict

REQUEST_CHANGES。 对原基线有短延迟改善,但相对当前主干的独立增量及消除竞争的主张均未成立。long_horizon、user_experience 为 not_applicable:只改变测试设置,未改变 Goal 续跑或产品交互。视觉检查为 not_applicable,因为该 smoke 未修改渲染呈现;未验证范围为完整打包浏览器旅程。无新增共享词汇、生产默认值或持久兼容格式,未合并。

English verdict: REQUEST_CHANGES — head 3b27598 still fails with a controlled 25.25-second delay and duplicates the current main clock strategy; retain the assertions and remove the running-clock race.

await page.clock.install({time: clockStart});
// Pause at one anchored future instant; an observed current time can
// already be in the past when the browser receives the next command.
await page.clock.pauseAt(clockStart + 25000);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 安装后时钟仍在走,未来25秒目标仍可被追过。准确head的同一实际Playwright1.62.1 clock序列在500ms延迟通过,但25,250ms后暂停前已到起点后25,251ms,pauseAt(clockStart+25000)仍抛Cannot fast-forward to the past,场景在quiet与导航断言前退出。请真正固定比较所用Date,保留定时器推进及比较后的系统时间恢复,再运行短/长延迟与完整场景;不要继续扩大常量。当前main已有同义25秒策略,也不能当作无竞态控制组;应整合为同一处有效修复或关闭已覆盖提案。

@huangruiteng huangruiteng closed this pull request by merging all changes into main in e37a1d6 Nov 8, 2026
@huangruiteng
huangruiteng deleted the codex/dashboard-clock-20261108T053510 branch November 8, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Mergify: the pull request has merge conflicts with its base branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants